<script setup>
import post from '@/views/home/components/content/components/post.vue'


defineProps({
  postList: {
    type: Object,
    required: true
  }
})

</script>

<template>
  <div class="container">

    <div v-if="postList.total !== 0">
      <post v-for="item in postList.records" key="item.postId" :postData="item"></post>

    </div>
    <el-empty style="margin-top: 130px;" :image-size="300" description="还没有这方面的帖子哎(っ- ‸ – ς)" v-else>
      <router-link to="/publish">
        <el-button type="danger">我来发布</el-button>
      </router-link>
    </el-empty>

  </div>
</template>

<style lang='scss' scoped></style>